package bean;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Data
public class Kids extends ManKind {
    private int yearsOld;

    public void printAge() {
        System.out.println(this.yearsOld);
    }

    public Kids() {
    }

    public Kids(int yearsOld) {
        this.yearsOld = yearsOld;
    }

    public Kids(int sex, int salary, int yearsOld) {
        super(sex, salary);
        this.yearsOld = yearsOld;
    }

    @Override
    public void employed() {
        super.employed();
        System.out.println("Kids should study and no job.");
    }
}
